# # # 求n个数的和：
# # def cheng(n:int) -> int :
# #     for i in range(1,n+1):
# #         n=n*i
# #     print(n)
# # cheng(15)
#
# # 冒泡排序：
# # a=[3,4,6,7,1,2,9,8,5]
# # for j in range(len(a)-1):
# #     for i in range(len(a)-1-j):
# #         if a[i]>a[i+1]:
# #             b = a[i]
# #             print(b)
# #             a[i]=a[i+1]
# #             a[i+1]=b
# #     print(a)
#
# # 选择排序
# # a=[3,4,6,7,1,2,9,8,5]
# # for j in range(len(a)):
# #     print(j)
# #     minindex = j
# #     i=j+1
# #     while i<len(a):
# #         if a[minindex] > a[i]:
# #             b=a[minindex]
# #             a[minindex]=a[i]
# #             a[i]=b
# #         i+=1
# # print(a)
#
#
# 快速排序
# def quick_sort(nums: list, left: int, right: int) -> None:
# 	if left < right:
# 		i = left
# 		j = right
# 		# 取第一个元素为枢轴量
# 		pivot = nums[left]
# 		while i != j:
# 			# 交替扫描和交换
# 			# 从右往左找到第一个比枢轴量小的元素，交换位置
# 			while j > i and nums[j] > pivot:
# 				j -= 1
# 			if j > i:
# 				# 如果找到了，进行元素交换
# 				nums[i] = nums[j]
# 				i += 1
# 			# 从左往右找到第一个比枢轴量大的元素，交换位置
# 			while i < j and nums[i] < pivot:
# 				i += 1
# 			if i < j:
# 				nums[j] = nums[i]
# 				j -= 1
# 		# 至此完成一趟快速排序，枢轴量的位置已经确定好了，就在i位置上（i和j)值相等
# 		nums[i] = pivot
# 		# 以i为枢轴进行子序列元素交换
# 		quick_sort(nums, left, i-1)
# 		quick_sort(nums, i+1, right)

# import random
# data = [random.randint(-100, 100) for _ in range(10)]
# quick_sort(data, 0, len(data) - 1)
# print(data)
# #
#
# # 直接插入排序
# # def insertSort(a: list)->list:
# #     """传入i元素位置为2，即0，1位置有序"""
# #     i = 0
# #     while a[i]:
# #         i += 1
# #         if i == len(a):
# #             return a
# #         if a[i] < a[i - 1]:
# #             """定义一个变量接受当前位置的值"""
# #             j = i - 1
# #             x = a[i]
# #             try:
# #                 while a[j] > a[j + 1]:
# #                     a[j + 1] = a[j]
# #                     a[j] = x
# #                     j -= 1
# #             except:
# #                 pass
# #
# # print(insertSort([ 80,70, 6, 4, 26, 18, 7, 2, 5]))
#
# # 斐波那些数列
# # def feibo(n:int):
# #     a = [0,1]
# #     for i in range(2,n+2):
# #         x = a[i-1] + a[i-2]
# #         a.append(x)
# #     return a
# # print(feibo(20))
#
#
# # 直接插入排序
# def insertSort(a: list)->list:
#     for i in range(2,len(a)):
#         x = a[i]
#         j = i - 1
#         while a[i] < a[j] and j > 1:
#             j -= 1
#             a[j+1] = a[j]
#         a[j+1] = x
#
# print(insertSort([ 80,70, 6, 4, 26, 18, 7, 2, 5]))
#
#

a = [2,1,2,3,3]
b = []
for i in a:
    if i not in b:
        b.append(i)
print(b)


# l1 = [1,4,4,2,3,4,5,6,1]
# new_l1 = []
# for i in l1:
#     if i not in new_l1:
#         new_l1.append(i)
# print(new_l1)


# import unittest
# import requests
# import json
#
# param = {
#     "a":"xx"
# }
# res = requests.get('http://www.baidu.com/denglu',param)
# res = json.loads(res)
#
# reeno = res['errno']
# meg = res["meg"]
#
# assert(reeno==0)
# assert(meg==null)



